﻿using battlenet.wow.rt.domain.objects;
using battlenet.wow.rt.sdk.data.dto;
using battlenet.wow.rt.sdk.utility;

namespace battlenet.wow.rt.sdk.objects.Mapper
{
    internal class WeaponDamageMapper : Remapper<WeaponDamage>
    {
        public override void RegisterMappers()
        {
            Register(typeof(DamageInfo), input => Map(input as DamageInfo));
        }

        internal WeaponDamage Map(DamageInfo info)
        {
            return  info == null
                ? new WeaponDamage() 
                : new WeaponDamage
                {
                    Min = info.Min,
                    Max = info.Max,
                    ExactMax = info.ExactMax,
                    ExactMin = info.ExactMin
                };
        }
    }
}